<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.thymeleaf.org">
<head>
    <title>登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" charset="UTF-8"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/body.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap/bootstrap.css}"/>
    <script th:src="@{/js/jquery/jquery-3.3.1.min.js}"></script>
    <script th:src="@{/js/bootstrap/bootstrap.js}"></script>
</head>

<body class="container">
<div class="contain">
    <form method="post" action="index">
        <label>姓名：<input name="name" type="text"/></label><span style="color: red" th:text="${name}"></span></br></br>
        <label>密码：<input name="password" type="password"/></label><span style="color: red"
                                                                        th:text="${pwd}"></span></br></br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <label><input type="submit" class="btn btn-primary" value="登录账号"/></label>&nbsp;&nbsp;&nbsp;&nbsp;
        <label><input type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal"
                      value="重置密码"/></label>
        <span style="color: red" th:text="${message}"></span>

    </form>
</div>
<div class="container">
    <!-- 按钮：用于打开模态框 -->
    <!--<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">
    </button>-->
    <!-- 模态框 -->
    <div class="modal fade" id="myModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <!-- 模态框头部 -->
                <div class="modal-header">
                    <h4 class="modal-title">重置密码</h4>
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>
                <!-- 模态框主体 -->
                <form method="post" th:action="@{reset}">
                    <div class="modal-body">

                        <label>姓名：<input name="name" type="text"/></label><span
                            th:text="${name}" style="color: red"></span>
                    </div>
                    <!-- 模态框底部 -->
                    <div class="modal-footer">
                        <button type="submit" class="btn btn-secondary">提交</button>
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
